import "@/assets/style/base.css";
import { createApp } from "vue";
//ECharts
import * as echarts from "echarts";
//route
import router from "@/router";

//注册antd
import Antd from "ant-design-vue";
import App from "./App.vue";
// import { useApi } from '@/api/index';
// const api = useApi();
import "ant-design-vue/dist/reset.css";

//注册全局组件
import { registerGlobalComponents } from "@/components/config/registerGlobalComponents";

//pinia
import { createPinia } from "pinia";
//pinia 持久化插件
import persist from "pinia-plugin-persistedstate";
import 'amfe-flexible';

const pinia = createPinia();
pinia.use(persist);

const app = createApp(App);

/**
 * 注册全局组件
 *  */

registerGlobalComponents(app);
// 全局挂载 echarts
app.config.globalProperties.$echarts = echarts;

console.log(import.meta.env);
document.title = import.meta.env.VITE_APP_TITLE;

app.use(pinia);

app.use(Antd);

app.use(router);

app.mount("#app");
